{layout name="p/base"}
    <div class="row">
      <div class="col-lg-12">
        <h1>营地管理 <small>泊位信息编辑</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="/camp"><i class="fa fa-dashboard"></i> 营地列表信息</a></li>
          <li><a href="/camp/{$camp_id}/park"><i class="fa fa-dashboard"></i> 泊位列表信息</a></li>
          <li class="active"><i class="fa fa-table"></i> 泊位信息编辑</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          请准确编辑泊位信息
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <!-- 选项卡start -->
      <div class="bs-example">
      	<!-- 选项卡标题start -->
        <ul class="nav nav-tabs" style="margin-bottom:15px;">
          <li class="active">
            <a href="#one" data-toggle="tab">泊位基本信息</a>
          </li>
          <li>
            <a href="#two" data-toggle="tab">泊位介绍图文信息</a>
          </li>
        </ul>
        <!-- 选项卡标题end -->
        <!-- 选项卡内容start -->
        <div id="myTabContent" class="tab-content">
          <!-- 选项卡内容1会员类型start -->
          <div id="one" class="tab-pane fade active in">
            <!-- 基本信息start -->
            <div class="col-lg-11">
              
              <!-- 会员信息start -->
              <form class="form-horizontal" id="addpark" role="form" action="/camp/{$camp_id}/park" method="post">
                <input type="hidden" name="content" id="content" value=''>
                  <div class="form-group">
                    <label for="firstname" class="control-label col-sm-2">使用状态</label>
                   <div class="col-sm-4">
                      <select class="form-control" name='use_state'>
                      {foreach $parkstatus as $k => $type}
                      <option value={$k}>{$type}</option>
                      {/foreach}
                      </select>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-2">泊位编号</label>
                    <div class="col-sm-4">
                      <input class="form-control" type="text" name="park_number" placeholder="sjz85468585">
                    </div>
                    <label class="control-label col-sm-2">泊位名称</label>
                    <div class="col-sm-4">
                      <input class="form-control" type="text" name="park_name" placeholder="请填写营地名称" >
                    </div>
                  </div>
                  <div class="form-group ">
                    <label for="firstname" class="control-label col-sm-2">泊位拥有者手机号</label>
                    <div class="col-sm-4">
                      <input class="form-control" type="text" name="member" placeholder="泊位拥有者手机号" >
                    </div>
                    <label for="firstname" class="control-label col-sm-2">泊位拥有者姓名</label>
                    <div class="col-sm-4">
                      <input class="form-control" type="text" name="name" placeholder="请填写姓名" >
                    </div>
                  </div>
              <!-- 会员信息end -->
            </div>
            <!-- 基本信息end -->
            <div class="btn-group mybtn col-sm-4 col-sm-offset-2">
                <a href="#two" data-toggle="tab" class="btn btn-primary">下一步</a>
            </div>
          </div>
          <!-- 选项卡内容1会员类型end -->
          <!-- 选项卡内容2级别start -->
          <div id="two" class="tab-pane fade">
            <!-- 基本信息start -->
          <div class="col-lg-12">

            <!-- KindEditor富文本编辑器 -->
            <textarea id='editor_id'  name="content1" style="width:100%;height:400px;visibility:hidden;"></textarea>


            

            <!-- baidu富文本编辑器 -->

            <div class="col-lg-10 col-lg-offset-1">
              <!-- 加载编辑器的容器 -->
                <script id="container" name="content" type="text/plain">
                </script>
                <!-- 配置文件 -->
                <script>
                    var UEDITOR_HOME_URL = "/ueditor/";
                </script>
                <script type="text/javascript" src="/UEditor/ueditor.config.js"></script>
                <!-- 编辑器源码文件 -->
                <script type="text/javascript" src="/UEditor/ueditor.all.js"></script>
                <!-- 实例化编辑器 -->
                <script type="text/javascript">
                    var ue = UE.getEditor('container');
                </script>

              <div class="col-lg-12 mybtn">
                <div class="btn-group">
                  <button class="btn btn-primary" id="add">提交</button>
                </div>
              </div>
         </div>
            <!-- 基本信息end -->
          </div>
          <!-- 选项卡内容2级别end -->
        </div>
        <!-- 选项卡内容end -->
      </form>
      </div>
      <!-- 选项卡end -->
    </div>

 <script>
          // KindEditor.ready(function(K) {
          //         window.editor = K.create('#editor_id');
          // });
    //         var editor;
  //});
    KindEditor.ready(function(K) {
        editor = K.create('textarea[name="content1"]', {
        //配置kindeditor编辑器的工具栏菜单项
        items:["source", "|", "undo", "redo", "|", "preview", "print",  "code", "cut", "copy", "paste", "plainpaste", "wordpaste","|", "justifyleft", "justifycenter", "justifyright", "justifyfull", "insertorderedlist", "insertunorderedlist", "indent", "outdent", "subscript", "superscript", "clearhtml", "quickformat", "selectall", "|", "fullscreen", "/", "formatblock", "fontname", "fontsize", "|", "forecolor", "hilitecolor", "bold", "italic", "underline", "strikethrough", "lineheight", "removeformat", "|", "image", "multiimage",  "table", "hr", "emoticons",  "pagebreak", "anchor", "link", "unlink", "|", "about"] ,
        uploadJson:"/public/kindeditor-4.1.7/php/upload_json.php",
        fileManagerJson:"/public/kindeditor-4.1.7/php/file_manager_json.php",
        uploadJson:"U('kindeditor/upload')",
        fileManagerJson:"U('kindeditor/filemanager')",
        /*点击按钮时打开上传图像的对话框 */
        // allowFileManager : true
   
        });
    });        
  </script>

<script type="text/javascript" src="/jquery.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
    $("#add").click(function(){
      var content = ue.getContent();
      $('#content').val(content);
      $("#addpark").submit();
      });
    });
</script>